package com.yiren.dbaa.module.practice_set.line.contract;

import com.yiren.backstage.currency.bean.LinePointBean;
import com.yiren.backstage.currency.entity.LineInfoEntity;
import com.yiren.backstage.currency.entity.ProjectEntity;
import com.yiren.dbaa.currency.api.CommonCallBack;

import java.util.List;

/**
 * @author lwb
 * @date : 2022/6/30 8:55
 * @description:
 */
public interface LineEditContract {

    interface Presenter {

        /**
         * 获取项目
         */
        List<ProjectEntity> getProjectList();

        /**
         * 获取线路点位
         *
         * @return
         */
        void getLinePoints(LineInfoEntity lineInfo, List<LinePointBean> pointList, int pageType, View view);

        /**
         * 新增线路设置线路信息
         *
         * @return
         */
        LineInfoEntity setLineInfo();

        /**
         * 添加点位
         *
         * @param lineInfo
         * @param pointList
         */
        void addPoint(LineInfoEntity lineInfo, List<LinePointBean> pointList, ProjectEntity project, View view);

        /**
         * 插入点位
         *
         * @param lineInfo
         * @param currentPointIndex
         * @param pointList
         */
        void insertPoint(LineInfoEntity lineInfo, int currentPointIndex, List<LinePointBean> pointList, ProjectEntity project, View view);

        /**
         * 修改线路点位
         *
         * @param indexStr
         * @param currentPointIndex
         * @param pointList
         */
        void modifyLinePoint(String indexStr, int currentPointIndex, List<LinePointBean> pointList, View view);

        /**
         * 替换点位
         *
         * @param lineInfo
         * @param currentPointIndex
         * @param pointList
         */
        void replacePoint(LineInfoEntity lineInfo, int currentPointIndex, List<LinePointBean> pointList, ProjectEntity project, View view);

        /**
         * 校准点位
         *
         * @param currentPointIndex
         * @param pointList
         */
        void calibrationPoint(int currentPointIndex, List<LinePointBean> pointList, View view);

        /**
         * 删除点位
         *
         * @param currentPointIndex
         * @param pointList
         */
        void deletePoint(int currentPointIndex, List<LinePointBean> pointList, View view);

        /**
         * 保存教练的修改值
         *
         * @param lineInfo
         * @param tempLinePoints
         */
        void saveCoachModify(LineInfoEntity lineInfo, List<LinePointBean> tempLinePoints);

        /**
         * 保存线路和线路点位
         *
         * @param lineInfo
         * @param pageType 1:新增  2:修改
         */
        void saveLineAndLinePoint(LineInfoEntity lineInfo, int pageType);
    }

    interface Model {

        /**
         * 从全部的线路中获取当前线路点位
         *
         * @param callBack
         */
        void getLinePointFromAll(LineInfoEntity lineInfo, CommonCallBack callBack);

        /**
         * 从服务器获取线路点位
         *
         * @param callBack
         */
        void getLinePoint(LineInfoEntity lineInfo, CommonCallBack callBack);

        /**
         * 设置线路GPS信息
         *
         * @param lineInfo
         */
        void setLineInfoGps(LineInfoEntity lineInfo);

        /**
         * 新增线路点位设置点位信息
         *
         * @param lineInfo
         * @param projectInfo
         * @return
         */
        LinePointBean setLinePoint(LineInfoEntity lineInfo, ProjectEntity projectInfo);

        /**
         * 设置点位的GPS信息
         *
         * @param linePoint
         * @return
         */
        void setLinePointGps(LinePointBean linePoint);

        /**
         * 设置教练修改合伙人线路中保存的coachModify
         *
         * @param lineInfo
         * @param tempLinePoints
         */
        void setCoachModify(LineInfoEntity lineInfo, List<LinePointBean> tempLinePoints);

    }

    interface View {

        /**
         * 加载项目列表
         */
        void loadProjectList();

        /**
         * 刷新百度地图
         */
        void refreshBaiduMap();
    }

}